<?php
defined('_JEXEC') or die( 'Restricted access' );

jimport( 'joomla.application.component.view');

class igprofileViewigprofile extends JView
{
	function display($tpl = null)
	{
		global $mainframe, $option;
		
		JToolBarHelper::title( JText::_( 'PROFILES'),'generic.png' );
		JToolBarHelper::custom('add_profile_redirect', 'new', '', JText::_( 'NEW PROFILE' ),false );
		JToolBarHelper::custom('copy', 'copy', '', JText::_( 'COPY PROFILE' ) );
		JToolBarHelper::deleteList( JText::_( 'VALIDDELETEITEMS' ) );
        
		$context = 'igprofile';
		$filter_state		= $mainframe->getUserStateFromRequest( $context.'.filter_state',		'filter_state',		'',				'word' );
		$filter_catid		= $mainframe->getUserStateFromRequest( $context.'.filter_catid',		'filter_catid',		0,				'int' );
		$filter_order		= $mainframe->getUserStateFromRequest( $context.'.filter_order',		'filter_order',		'ordering',	'cmd' );
		$filter_order_Dir	= $mainframe->getUserStateFromRequest( $context.'.filter_order_Dir',	'filter_order_Dir',	'',				'word' );
		$search				= $mainframe->getUserStateFromRequest( $context.'.search',			'search',			'',				'string' );
		$search				= JString::strtolower( $search );

		$items		= & $this->get( 'Data');
		$total		= & $this->get( 'Total');
		$pagination = & $this->get( 'Pagination' );

		$lists['state']	= JHTML::_('grid.state',  $filter_state );
		$lists['order_Dir'] = $filter_order_Dir;
		$lists['order'] = $filter_order;
		$lists['search']= $search;
		
		$db	=& JFactory::getDBO();

		$this->assignRef('db',		    $db);
		$this->assignRef('lists',		$lists);
		$this->assignRef('items',		$items);
		$this->assignRef('pagination',	$pagination);

		parent::display($tpl);
	}
}